package com.xtpt.disaster.common.consts;

import com.alibaba.druid.util.StringUtils;
import io.swagger.models.auth.In;
import lombok.Data;

/***
 * 数据库类型  0-MYSQL 1-ORACLE 2-SQLSERVER 3-达梦 4-金仓  5-神通
 */
public enum DBEnum implements BaseEnum{

    //枚举值定义
    MYSQL(0,"MYSQL"),
    ORACLE(1,"ORACLE"),
    SQLSERVER(2,"SQLSERVER"),
    DAMENG(3,"DAMENG"),
    KINGBASE(4,"KINGBASE"),
    SHENTONG(5,"SHENTONG");

    private String name;
    private Integer value;

    private DBEnum(Integer value,String name){
        this.name = name;
        this.value = value;
    }

    public static DBEnum getObject(Integer value){
        for(DBEnum dbEnum: DBEnum.values()) {
            if(dbEnum.getValue().equals(value)){
                return dbEnum;
            }
        }
        return null;
    }


    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    @Override
    public Integer getValue() {
        return value;
    }

    public void setValue(Integer value) {
        this.value = value;
    }



}
